Add gtk_action_muxer_list_actions
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 Jul 2020 05:55:13 +0000 (01:55 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 20 Jul 2020 12:24:53 +0000 (08:24 -0400)
This is needed to reinstate the actions support
in the inspector.

gtk/gtkactionmuxer.c
gtk/gtkactionmuxerprivate.h

index e08cc87c559abeca7d38a01e3151046447276900..a1ad87326a2ca304dd61161412ec3faee569bd4d 100644 (file)
@@ -120,7 +120,6 @@ get_action_position (GtkWidgetAction *action)
   return slot;
 }
 
-#if 0
 static void
 gtk_action_muxer_append_group_actions (const char *prefix,
                                        Group      *group,
@@ -139,15 +138,13 @@ gtk_action_muxer_append_group_actions (const char *prefix,
   g_strfreev (group_actions);
 }
 
-static gchar **
-gtk_action_muxer_list_actions (GActionGroup *action_group)
+char **
+gtk_action_muxer_list_actions (GtkActionMuxer *muxer)
 {
-  GtkActionMuxer *muxer = GTK_ACTION_MUXER (action_group);
   GHashTable *actions;
   char **keys;
 
-  actions = g_hash_table_new_full (g_str_hash, g_str_equal,
-                                   g_free, NULL);
+  actions = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
 
   for ( ; muxer != NULL; muxer = muxer->parent)
     {
@@ -177,7 +174,6 @@ gtk_action_muxer_list_actions (GActionGroup *action_group)
 
   return (char **)keys;
 }
-#endif
 
 static Group *
 gtk_action_muxer_find_group (GtkActionMuxer  *muxer,
index 3d65e8a3429318f2ca642eed117d116337239a8e..7708d5eb1c794349aff423d1e113d9d3860b3245 100644 (file)
@@ -87,6 +87,7 @@ void                    gtk_action_muxer_change_action_state            (GtkActi
                                                                          GVariant            *state);
 gboolean                gtk_action_muxer_has_action                     (GtkActionMuxer      *muxer,
                                                                          const char          *action_name);
+char **                 gtk_action_muxer_list_actions                   (GtkActionMuxer      *muxer);
 
 
 void